<? require($_SERVER['DOCUMENT_ROOT'] . '/gs-sos/application/views/inc_header.php'); ?>


<? require($_SERVER['DOCUMENT_ROOT'] . '/gs-sos/application/views/inc_cat_banner.php'); ?>

<section id="main">
    <div class="container">
        <div class="row">
            <div id="catalog" class="content span9">

                <br><br>
                <div class="category-img">
                    <div class="description"><? echo $cat_name ?></div>
                </div>
                <div class="clearfix"></div>

                <? if ($query->num_rows() > 0) { ?>
                    <div class="products grid row">
                        <? foreach ($query->result() as $row) { ?>

                            <div class="span3 product">
                                <div class="default">
                                    <a href="<? echo base_url().'Product/prddetail/'.$row->PRD_ID ?>" class="product-image">
                                        <img src="<? echo $row->PRD_IMG_1; ?>" width="170" height="170" alt="">
                                    </a>
                                    <div class="product-description">
                                        <div class="vertical">
                                            <h3 class="product-name">
                                                <a href="#"><? echo $row->PRD_NAME ?></a>
                                            </h3>
                                            <div class="price"><? echo $row->SALE_PRICE ?> บาท</div>	
                                        </div>
                                    </div>
                                </div>
                            </div><!-- .product -->
                        <? } ?>
                    <? } else { ?>
                        <div class="title">
                            <b>ยังไม่มีรายการสินค้าในหมวดหมู่นี้</b>
                        </div>
                    <? } ?>

                </div>
            </div><!-- .content -->
            <? if ($query_brand_gp->num_rows() > 0) { ?>
            <div id="sidebar" class="sidebar span3">
                <aside class="list">
                    <header>
                        <h3>ยี่ห้อสินค้า</h3>
                    </header>
                    <ul>
                        <? foreach ($query_brand_gp->result() as $row) { ?>
                        <li><a href="<? echo base_url().'Category/viewPrdByCatAndBrand/'.$cat_id.'/'.$row->BRAND_ID ?>"><? echo $row->BRAND_NAME ?> 
                                <span>(<? echo $row->NUMBER ?>)</span>
                            </a>
                        </li>
                        <? } ?>
                    </ul>
                </aside>
            </div>
            <? } ?>
        </div>
    </div><!-- .container -->
</section><!-- #main -->

<? require($_SERVER['DOCUMENT_ROOT'] . '/gs-sos/application/views/inc_footer.php'); ?>